package cn.tedu.smartos.health.mapper;

import cn.tedu.smartos.health.pojo.entity.HealthAlertRecord;
import cn.tedu.smartos.health.pojo.vo.HealthAlertVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface HealthAlertMapper {
    int insertAlert(HealthAlertRecord alertRecord);

    List<HealthAlertVO> selectAlertsByFamilyUserId(@Param("familyUserId") Long familyUserId);

    List<HealthAlertVO> selectUnhandledAlertsByFamilyUserId(@Param("familyUserId") Long familyUserId);

    HealthAlertVO selectAlertById(@Param("alertId") Long alertId);

    int updateAlertStatus(@Param("alertId") Long alertId,
                          @Param("handleStatus") Integer handleStatus,
                          @Param("handleUserId") Long handleUserId,
                          @Param("handleComment") String handleComment);
}